﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NGourd.Core.Reports;

namespace NGourd.Core.Plans
{
    class SkipPlanStep : IPlan
    {
        private readonly string text;
        private readonly ReportTarget reportTarget;
        private readonly ReportStatus reportStatus;
        private readonly string reason;

        public SkipPlanStep(ReportTarget reportTarget, ReportStatus reportStatus, string text, string reason)
        {
            this.text = text;
            this.reportTarget = reportTarget;
            this.reportStatus = reportStatus;
            this.reason = reason;
        }

        #region IPlan Members

        public ReportNode Execute(bool skipExecution)
        {
            return new ReportNode(reportTarget, text + Environment.NewLine + reason) { Status = reportStatus };
        }

        #endregion
    }
}
